<UserControl x:Class="QUT.Bio.SilverMap.SequencePropertyPanel"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:util="clr-namespace:QUT.Bio.Util">

	<UserControl.Resources>
		<Style x:Key="Text"
			   TargetType="TextBlock">

			<Setter Property="VerticalAlignment"
					Value="Top" />

			<Setter Property="FontFamily"
					Value="Courier New" />

			<Setter Property="FontSize"
					Value="12" />

			<Setter Property="TextWrapping"
					Value="Wrap" />

			<Setter Property="Margin"
					Value="0 2 0 0" />
		</Style>

		<Style x:Key="Head"
			   TargetType="TextBlock">

			<Setter Property="VerticalAlignment"
					Value="Top" />

			<Setter Property="FontSize"
					Value="12" />

			<Setter Property="Margin"
					Value="0 0 5 0" />
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot"
		  Background="White">

		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="auto" />
			<ColumnDefinition Width="5" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="*" x:Name="xrefRow" />
		</Grid.RowDefinitions>

		<StackPanel Orientation="Horizontal"
					Grid.Column="0"
					Grid.Row="1"
					Grid.ColumnSpan="3"
					Height="19">

			<TextBlock Text="Primary sequence"
					   Style="{StaticResource Head}" />

			<TextBlock Style="{StaticResource Text}"
					   Grid.Column="1"
					   Name="labelField"
					   Text="No sequence is selected" />

		</StackPanel>

		<Grid Grid.Column="1"
			  Grid.Row="2"
			  Grid.ColumnSpan="3"
			  Name="descriptionGrid"
			  Margin="15 0 5 0"
			  HorizontalAlignment="Stretch">

			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="auto" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>

			<Grid.RowDefinitions>
				<RowDefinition Height="auto" />
				<RowDefinition Height="auto" />
			</Grid.RowDefinitions>

			<ScrollViewer Grid.Column="0"
						  Grid.Row="1"
						  Grid.ColumnSpan="2"
						  MaxHeight="150"
						  VerticalScrollBarVisibility="Auto">
				<TextBlock Style="{StaticResource Text}"
						   Name="descriptionField" />
			</ScrollViewer>
		</Grid>

		<TextBlock Grid.Column="0"
				   Grid.Row="3"
				   Grid.ColumnSpan="3"
				   Text="Local alignments (HSPs)"
				   Style="{StaticResource Head}" />

		<ScrollViewer Grid.Row="4"
					  Grid.ColumnSpan="3">

			<StackPanel Orientation="Vertical"
						Name="hspContainer" />

		</ScrollViewer>

		<Grid Name="xrefContainer"
			  Grid.Row="5"
			  Grid.ColumnSpan="3">

			<Grid.RowDefinitions>
				<RowDefinition Height="auto" />
				<RowDefinition Height="*" />
				<RowDefinition Height="auto" />
			</Grid.RowDefinitions>

			<TextBlock Name="xrefLiteral"
					   Grid.Column="0"
					   Grid.Row="0"
					   Grid.ColumnSpan="3"
					   Text="Genes"
					   Style="{StaticResource Head}" />

			<util:DataGrid x:Name="xrefGrid"
						   Grid.Column="0"
						   Grid.Row="1"
						   AutoGenerateColumns="False"
						   AlternatingRowBackground="White"
						   RowBackground="White"
						   GridLinesVisibility="None"
						   HorizontalAlignment="Stretch"
						   SelectionMode="Extended"
						   VerticalAlignment="Stretch"
						   Margin="5 0 5 0"
						   FontSize="12"
						   SelectionChanged="XrefGridSelectionChanged">

				<util:DataGrid.Columns>
					<util:DataGridTextColumn Header="DB"
											 Binding="{Binding Database}"
											 CanUserReorder="True"
											 IsReadOnly="True" />

					<util:DataGridTextColumn Header="Id"
											 Binding="{Binding Id}"
											 CanUserReorder="True"
											 IsReadOnly="True" />
				</util:DataGrid.Columns>
			</util:DataGrid>

			<Button Grid.Row="2"
					Content="Show details"
					Click="ShowDetails"
					Name="showDetails"
					HorizontalAlignment="Center" />
		</Grid>

		<Grid Name="overlay"
			  Background="White"
			  Grid.RowSpan="6"
			  Grid.ColumnSpan="3">
			<TextBlock Text="Please select a sequence"
					   HorizontalAlignment="Center"
					   VerticalAlignment="Center" />
		</Grid>
	</Grid>
</UserControl>
